// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023.
 * Description: MCE: notify BSP when MCE interrupt happens
 * Author: lvying <lvying6@huawei.com>
 * Create: 2023-11-14
 */
/*
 * fma_mce_do_chain is used to notify the BSP to record the MSR register
 */

#include <asm/mce.h>
#include <linux/export.h>
#include <linux/notifier.h>

ATOMIC_NOTIFIER_HEAD(fma_mce_do_chain);

void fma_register_mce_do_chain(struct notifier_block *nb)
{
	atomic_notifier_chain_register(&fma_mce_do_chain, nb);
}
EXPORT_SYMBOL_GPL(fma_register_mce_do_chain);

void fma_unregister_mce_do_chain(struct notifier_block *nb)
{
	atomic_notifier_chain_unregister(&fma_mce_do_chain, nb);
}
EXPORT_SYMBOL_GPL(fma_unregister_mce_do_chain);
